package com.cxw.healthserver.entity

import com.baomidou.mybatisplus.annotation.FieldFill
import com.baomidou.mybatisplus.annotation.IdType
import com.baomidou.mybatisplus.annotation.TableField
import com.baomidou.mybatisplus.annotation.TableId
import com.cxw.healthserver.type_handler.DiseaseListTypeHandler
import java.util.*

/**
 * @createTime 2024/6/23 19:57
 * @author 崔兴旺
 * @description
 */
class Resident {
    @TableId(type = IdType.ASSIGN_ID)
    var id: String = ""

    var realname: String = ""
    var username: String = ""
    var idNumber: String = ""
    var classifyCode: String = ""

    //添加了自定义的类型处理器
    @TableField(value = "diseaseList", typeHandler = DiseaseListTypeHandler::class)
    var diseaseList: MutableList<Disease>? = null

    var hasArchive: Int = 0//是否有档案
    var signState: Int = 0//签约状态  0:未签约 1:已签约 2.签约过期
    var json: String = ""

    @TableField(fill = FieldFill.INSERT)
    val createTime: Date? = null

    @TableField(fill = FieldFill.INSERT_UPDATE)
    val updateTime: Date? = null
}